package com.zhaojiu.example.service.beetl.function;

import cn.hutool.core.util.StrUtil;
import org.beetl.core.Context;
import org.beetl.core.Function;

/**
 * @author huangshb
 * @date 2024/8/5
 */
public class UpperFirst implements Function {
    @Override
    public Object call(Object[] paras, Context ctx) {
        Object o = paras[0];
        if (o != null){
            return StrUtil.upperFirst(o.toString());
            }
//                char[] chars = StrUtil.upperFirst(o.toString()).toCharArray();
//                ctx.byteWriter.write(chars);
        return "";
    }
}
